@import "_var";


//base
$phone:750;
$url:'../../img/';
$remBase:$phone/20;
//font-size
@function torem($size) {
  $remSize: $size / $remBase;
  @return $remSize * 1rem;
}

//ellipsis
@mixin ellipsis(){
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

//flexbox
@mixin flexbox(){
	//OLD - iOS 6-, Safari 3.1-6 
	display: -webkit-box;
  	//NEW - Chrome
  	display: -webkit-flex;
  	display: flex;
}
//flex
@mixin flex($per){
	-webkit-box-flex:$per;
	-webkit-flex:$per;
	flex:$per;
	//下面3个属性是为了兼容安卓4.3
	display:block;
	width:0%;
	overflow:hidden;
}
//arrow
@mixin arrow($deg){
	content: '';
	display:inline-block;
	margin-top:torem(-5);
	width:torem(10);
	height:torem(10);
	border-right:1px solid #C7C7C7;
	border-top:1px solid #C7C7C7;
	@include transform(rotate($deg));
}
//center
@mixin center(){
	display:-webkit-box;
	display:-moz-box;
	display:-ms-box;
	display:-o-box;
	display:box;
	-webkit-box-pack: center;
	box-pack:center;
	-webkit-box-align:center;
	box-align:center;
}
// border-bottom
@mixin borderBottom(){
	&:before{
		content: '';
		display: block;
		width: 100%;
		height: 1px;
		background: $lineGray;
		position: absolute;
		bottom:0;
		left: 0;
    	@include transform(scaleY(0.5));
	}
}
//keyframes
@mixin keyframes($animateName){
	@-webkit-keyframes #{$animateName}
	{
		@content;
	}
	@keyframes #{$animateName}
	{
		@content;
	}
}
//animation
@mixin animation($str) {
	animation: $str;
	-webkit-animation: $str;
	// -moz-animation: $str;
	// -ms-animation: $str;
	// -o-animation: $str;
}
//transition
@mixin transition($transition){
	transition:$transition;
	-webkit-transition:$transition;
	// -moz-transition:$transition;
	// -ms-transition:$transition;
	// -o-transition:$transition;
}
//transform
@mixin transform($transition){
	transform:$transition;
	-webkit-transform:$transition;
	// -moz-transform:$transition;
	// -ms-transform:$transition;
	// -o-transform:$transition;
}


